import sys
from datetime import datetime,timedelta
import time

arg = sys.argv
if len(arg) != 3:
    print("please use xx.py xx-xx-xx xx:xx:xx")
    exit(1)
try:
    t1 = time.strptime(arg[1],"%Y-%m-%d %H:%M:%S")
    t2 = int(arg[2])
except ValueError:
    print("传递参数不正确")
delta = timedelta(days=t2)
dtime = datetime(*t1[:6]) - delta
ret = dtime.strftime("%A %F %T")
print(ret)